package com.ruoyi.system.agriculture.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.agriculture.domain.po.AgOutput;
import com.ruoyi.system.agriculture.mapper.AgOutputMapper;
import com.ruoyi.system.agriculture.service.IAgOutputService;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 农业产出品Service业务层处理
 */
@Service
public class AgOutputServiceImpl extends ServiceImpl<AgOutputMapper, AgOutput> implements IAgOutputService {
    /**
     * 查询农业产出品列表
     * 
     * @param output 农业产出品信息
     * @return 农业产出品集合
     */
    @Override
    public List<AgOutput> selectOutputList(AgOutput output) {
        LambdaQueryWrapper<AgOutput> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.like(output.getOutputName() != null, AgOutput::getOutputName, output.getOutputName())
                .eq(output.getOutputType() != null, AgOutput::getOutputType, output.getOutputType())
                .eq(output.getSaleStatus() != null, AgOutput::getSaleStatus, output.getSaleStatus())
                .like(output.getStorageLocation() != null, AgOutput::getStorageLocation, output.getStorageLocation());
        return list(queryWrapper);
    }
} 